[XEN] Can be built -std=gnu99 (except for .S files).
Need to be careful with static initialisers:
1. *_LOCK_UNLOCKED, CPU_MASK_* no longer include a cast
2. Dynamic uses of the above are replaced by
appropriate function invocations.
Use new 'hg parents --template' support instead of awk scraping.
Also avoid use of non-portable 'whoami'. Use the USER env var instead. Signed-off-by: Keir Fraser <keir@xensource.com>
[SOLARIS] Provide non-gcc-specific defn. of RING_HAS_UNCONSUMED_REQUESTS.
From: Mark Johnson <mark.johnson@sun.com> Signed-off-by: Keir Fraser <keir@xensource.com>
[SOLARIS] On sysv platforms, gas defaults '/' to a comment
character. Pass in the right option to disable this behaviour, so
Xen's semantics of "divide" apply.
Tim Deegan [Tue, 17 Oct 2006 10:14:17 +0000 (11:14 +0100)]
[XEN] Heuristic for fast revoke-write-access in HIGHPTE linux guests
This adds a heuristic for speeding up revocation of write access to
pagetables for HIGHPTE linux kernels, which previously had to brute-force
search all L1 shadows.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
Tim Deegan [Tue, 17 Oct 2006 10:11:48 +0000 (11:11 +0100)]
[XEN] Don't keep shadows of PAE guest l3 tables.
Holding pages readonly that have guest PAE l3 tables in them means
a performance hit and potential bug if the guest puts other
datastructures on the same page as an l3 table. Instead of shadowing
them, treat PAE guests as if they had four CR3 registers, and load all
four top-level entries when we handle a CR3 write. This also cuts about
500 lines of special-case refcounting and re-copying code.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
Tim Deegan [Tue, 17 Oct 2006 10:07:11 +0000 (11:07 +0100)]
[XEN] Don't kill shadowed guest for writing bogus PTEs.
If a guest writes a "bad" pagetable entry and we fail to unshadow the
page, don't kill the guest. This makes the behaviour the same as
if the bad PTE were already in place when we shadowed the page.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
[SHADOW] Trivial whitespace fix to a couple of printf format strings.
From: Brendan Cully <brendan@cs.ubc.ca> Signed-off-by: Keir Fraser <keir@xensource.com>
[XEND] Check for and fail on non-existent floppy-drive file when starting HVM guest.
The qemu device model hangs when a non-existent floppy file is passed
via 'fda' or 'fdb'. The attached patch checks whether the floppy file
exists and raises an error if it does not.
[NET] back: Simplify probing of new interfaces. There's no need
to watch for creation of the handle node in xenstore, as it is
written by xend when creating the backend directory as part of
the same transaction. Signed-off-by: Keir Fraser <keir@xensource.com>
[HVM][SVM] Check if SVM is disabled by the BIOS before enabling it.
Newer BIOS implementations will be able to disable the SVM feature,
although an additional test of an MSR (VMCR 0xC0010114 bit 4) is
necessary (set equals disabled). Bit 4 of MSR 0xc0010114 returns 0
(SVM enabled) on machines with older BIOS' without the SVM disable
feature support.
Signed-off-by: Wei Huang <wei.huang2@amd.com>=20 Signed-off-by: Tom Woller <thomas.woller@amd.com>=20
Fix privcmd mmap() on 64b architectures for regions larger than 2GB. Signed-off-by: Xin Li <xin.b.li@intel.com> Signed-off-by: Keir Fraser <keir@xensource.com>
[IA64] Add support for enforcing singleshot mmap() semantics at the
privcmd interface.
From: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Keir Fraser <keir@xensource.com>
[xenstore] Don't limit the number of concurrent transactions for domain0 connections
since both xend and the xenstore-* utilities used in the hotplug
scripts can easily reach the limit and we trust them anyway.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
Tim Deegan [Thu, 12 Oct 2006 10:08:48 +0000 (11:08 +0100)]
[XEN] Fix race in shadow invlpg
This fixes a crash under mmstress in SMP linux guests, where one vcpu
could remove shadow entries when another was reading them for invlpg. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
Tim Deegan [Mon, 9 Oct 2006 15:43:09 +0000 (16:43 +0100)]
[XEN] Zero PAE shadow l3es when destroying subshadows.
Normally, we can leave the contents of shadows in place when we destroy
them, but this is not the case for l3 subshadows, since they do not get
zeroed on reallocation unless the entire l3 page is unshadowed.
This fixes several crashes seen with SMP PAE HVM RHEL4.2 guests. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
[XEND] No need to decompress the initrd when building a domain.
The guest OS should be capable of parsing an image file in
whatever format was produced by that OS's tools. Furthermore,
we have seen initrd images with trailing garbage. This causes
us to calculate the wrong size for the uncompressed data and hence
fail to build the guest. Signed-off-by: Keir Fraser <keir@xensource.com>
[LINUX] Various fixes for mmapping I/O and foreign memory pages.
First, auto-translate guests can use remap_pfn_range() rather than
direct_remap_pfn_range(). This actually works better because
remap_pfn_range() can legitimately assert VM_PFNMAP (this patch
removes this flag for direct_remap_pfn_range().
There are various cleanups and fixes to the privcmd interface:
1. VMAs should be searched and used under the mmap semaphore
2. Mapping should be single shot (since cirect_remap_pfn_range()
expects the PTEs to be empty when it is called).
3. Demand-fault population of the privcmd vma should be disallowed.
4. Various others, including a more thorough check of input args.
Tim Deegan [Mon, 9 Oct 2006 09:18:11 +0000 (10:18 +0100)]
Since shadow_update_paging_modes() will modify v->arch.hvm_vcpu.hw_cr3,
so we should always do shadow_update_paging_modes() before we writes to
GUEST_CR3 with v->arch.hvm_vcpu.hw_cr3.
Signed-off-by: Xiaohui Xin xiaohui.xin@intel.com Signed-off-by: Xin Li <xin.b.li@intel.com>
[BALLOON] Replace alloc_empty_page_range with new helper alloc_empty_pages_and_pagevec.
This is a better fit with all the callers, who now allocate discontiguous empty pages. Signed-off-by: Keir Fraser <keir@xensource.com>
Although in the correct spirit, it seems there is some other
dependency in the code that assumes ExtInts are queued until
thay can be immediately delivered (EFLAGS.IF==1). This patch
therefore caused instability in Linux guests.
[NET] back: Remove unused rx_mmap area. Copying happens inside Xen, so
there is no need for a mapping area inside the driver for copying
receive path. Signed-off-by: Keir Fraser <keir@xensource.com>
[BLK] back: Allocate pages for foreign mappings individually rather
than in one large contiguous region. Signed-off-by: Keir Fraser <keir@xensource.com>
Make sure that if one of the intermediate steps fails, a subsequent
make invocation doesn't think there's nothing to do.
This should be viewed as an intermediate step towards splitting up
the rule into three independent ones, passing intermediate files
from one to the next.
Tim Deegan [Thu, 5 Oct 2006 15:21:39 +0000 (16:21 +0100)]
[VMX] Remove vcpu->arch.hvm_vmx.cpu_state
The flags in hvm_vmx.cpu_state were shadows of shadows of bits in
guest CR0_READ_SHADOW, CR4_READ_SHADOW and EFER, and were not being
kept in sync with the other shadows if changes were made while
running under vmxassist. Just use the full shadows of those control
regs instead, and replace cpu_state with a single vmxassist flag.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
[XEND] Fix pygrub when run server-side on a domain with blktap disks.
For some slightly-crazy reason the blktap patches changed the name
of the SEXPR block containing the disk definition 'vbd' to 'tap', even
though merely changing the 'uname' fragement was sufficient. eg
If you create a domain with xm, then xm runs pygrub client side which
works fine. If you create a domain by feeding a block of SEXPR to Xend
over its network port, then pygrub is run server side. The code in
XenD which decides which disk to run pygrub against only looks for
'device/vbd' in the SEXPR so fails to see any blktap disks.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
[NET] front: Fix size of grant_rx_ref[]. It should use the RX ring
size, rather than the TX ring size. Signed-off-by: Jose Renato Santos <jsantos@hpl.hp.com>
[HVM/vncserver] Implement a 'vnclisten' option to limit the interface
that the VNC server from qemu listens on.
Defaults to only listen on 127.0.0.1
The old behaviour (listen on all interfaces) can be restored, by
- changing the system-wide default in /etc/xen/xend-config.sxp by adding:
(vnc-listen '0.0.0.0')
- changing individual domain config files by adding:
vnclisten="0.0.0.0"
Also allows specifying the hostname associated with an interface to limit
to that interface.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
[BLKTAP] Blktapctrl: Add asynchronous watch on dom0 name entry for blktapctrl on startup. This patch cleans up the synchronisation issues between blktapctrl and xend at initialisation if the Dom0 entries have not yet been populated.